package main;

import service.LogbackFileLogger;

/**
 * 程序主入口
 *
 * @author zhou
 * @create 2017-12-27 00:13
 * @email zhouinfo@qq.com
 * @blog blog.zhouinfo.site
 */
public class MainClass {

    public static void main(String[] args) {
        MainClass.initWorkDir();

        LogbackFileLogger logger = new LogbackFileLogger();
        logger.logInfo2file();
    }

    /**
     * 日志输出到程序根目录(classpath)
     */
    public static void initWorkDir() {
        String workDir = LogbackFileLogger.class.getResource("/").getPath();
        System.setProperty("WORKDIR", workDir);
    }
}
